<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <script src="../lib/jsc.min.js" type="text/javascript"></script>
    <script src="../viewx.min.js"></script>
    <script>
        Page({
            data: {
                show: 1,
                name1: "Tom",
                name2: "Mary",
                name3: "Lucy"
            },
            onLoad: function () {
                var that = this;

                setInterval(function () {
                    that.setData({
                        show: (that.data.show+1)%3
                    });
                }, 500);
            }
        })
    </script>
</head>
<body>
    <div><vx>{{show}}</vx></div>
    <div class="vx" vx-if="{{show==0}}">Hi, <vx>{{name1}}</vx>!</div>
    <div class="vx" vx-elif="{{show==1}}">Hi, <vx>{{name2}}</vx>!</div>
    <div class="vx" vx-else>Hi, <vx>{{name3}}</vx>!</div>
</body>
</html>